<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
if($_SERVER["REMOTE_ADDR"] != "218.32.210.153" && $_SERVER["REMOTE_ADDR"] != "218.32.210.156" && $_SERVER["REMOTE_ADDR"] != "59.120.49.178"){
	print ":p => ".$_SERVER["REMOTE_ADDR"];
	exit();
}
$arrCon = file("http://192.168.5.200/test/makeMD5String.php");
$_DBSite = "Master";
include_once($_SERVER["DOCUMENT_ROOT"]."/db.inc.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/getvars.inc.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/modules/Tool.lib.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/modules/Lotto.lib.php");

if(trim($arrCon[0]) !== trim($_data["CK"])){
	print "^_^|||".$_data["CK"];
	print_r($arrCon);
	exit();
}
$arrSQL = split(";;;", stripslashes($_data["strSQL"]));

if(!is_array($arrSQL)){
	print "No SQL Command!!";
	exit();
}

foreach($arrSQL as $strSQL){
	if(!mysql_query($strSQL, $_ConnMaster)){
		print "SQL: ".$strSQL."<br>\n";
		print "Error: ".mysql_error($_ConnMaster)."<br>\n";
	}
}
if(ereg("bet_SystemParam", $_data["strSQL"])){
	if(!makeSystemParamFile()){
		print $GLOBALS["errormessage"]."<br>\n";
		print $GLOBALS["errorhidden"]."<br>\n";
	}
	print " | SystemParamFile | ";
}
if(ereg("bet_Marquee", $_data["strSQL"])){
	include_once($_SERVER["DOCUMENT_ROOT"]."/modules/Marquee.lib.php");
	if(!MakeMarquee()){
		print $GLOBALS["errormessage"]."<br>\n";
		print $GLOBALS["errorhidden"]."<br>\n";
	}
	print " | Marquee | ";
}
if(ereg("bet_MemberGroup|bet_Program", $_data["strSQL"])){
	if(!MakeAdminMenu()){
		print $GLOBALS["errormessage"]."<br>\n";
		print $GLOBALS["errorhidden"]."<br>\n";
	}
	print " | AdminMenu | ";
}
if(ereg("bet_Lotto", $_data["strSQL"])){
	if(!MakeAnimalsParamsFile(1, "")){
		print $GLOBALS["errormessage"]."<br>\n";
		print $GLOBALS["errorhidden"]."<br>\n";
	}
	print " | AnimalsParamsFile | ";
	if(!MakeGameGambleType()){
		print $GLOBALS["errormessage"]."<br>\n";
		print $GLOBALS["errorhidden"]."<br>\n";
	}
	print " | GameGambleTypeFile | ";
}
?>OK